var rule = {
    title: '路漫漫',
    author: '走,钓鱼去',
    desc: '纯js版本',
    host: "https://www.lmm96.com/",
    url: "/vod/show/id/fyclass/page/fypage.html",
    searchUrl: '/vod/search/page/fypage/wd/**.html',
    searchable: 1,
    quickSearch: 0,
    filterable: 0,
    headers: {
        'User-Agent': 'UC_UA'
    },
   timeout: 5000,
    class_name: "日本动漫&国产动漫&欧美动漫&动态漫画&日本动画电影&国产动画电影&欧美动画电影",
    class_url: "6&7&8&dongtaiman&teshepian&3&4&oumeidonghuadianying",
    play_parse: true,
    limit: 6,
    double: true,
    预处理: async () => {
    return []
  },
lazy: async function () {
        let {input, pdfa, pdfh, pd} = this
        const html = JSON.parse((await req(input)).content.match(/r player_.*?=(.*?)</)[1]);
        let url = html.url;
        if (html.encrypt == "1") {
            url = unescape(url)
            return {parse: 0, url: url}
        } else if (html.encrypt == "2") {
            url = unescape(base64Decode(url))
            return {parse: 0, url: url}
        }
        if (/m3u8|mp4/.test(url)) {
            input = url
            return {parse: 0, url: input}
        } else {
            return {parse: 1, url: input}
        }
    },
    一级: async function () {
        let {input, pdfa, pdfh, pd} = this;
        let html = await request(input);
        let d = [];
        let data = pdfa(html, '.video-img-box');
        data.forEach((it) => {
            d.push({
                title: pdfh(it, 'h6.title&&Text'),
                pic_url: pd(it, '.lazyload&&data-src'),
                desc: pdfh(it, '.absolute-bottom-right&&Text'),
                url: pd(it, 'a&&href'),
            })
        });
        return setResult(d)
    },
    二级: async function () {
        let {input, pdfa, pdfh, pd} = this;
        let html = await request(input);
        let VOD = {};
        VOD.vod_name = pdfh(html, '.page-title&&Text');
        VOD.vod_content = pdfh(html, '.video-info-content&&Text');
        VOD.vod_remarks = "钓鱼分享";
        let playlist = pdfa(html, '.module-blocklist.scroll-box')
        let tabs = pdfa(html, '.module-tab-item.tab-item');
        let playmap = {};
        tabs.map((item, i) => {
            const form = pdfh(item, 'Text')
            const list = playlist[i]
            const a = pdfa(list, 'body&&a')
            a.map((it) => {
                let title = pdfh(it, 'span&&Text')
                let urls = pd(it, 'a&&href', input)
                if (!playmap.hasOwnProperty(form)) {
                    playmap[form] = [];
                }
                playmap[form].push(title + "$" + urls);
            });
        });
        VOD.vod_play_from = Object.keys(playmap).join('$$$');
        const urls = Object.values(playmap);
        const playUrls = urls.map((urllist) => {
            return urllist.join("#")
        });
        VOD.vod_play_url = playUrls.join('$$$');
        return VOD
    },
    搜索: async function () {
        let {input, pdfa, pdfh, pd} = this;
        let html = await request(input);
        let d = [];
        let data = pdfa(html, '.video-img-box.mb-e-20');
        data.forEach((it) => {
            d.push({
                title: pdfh(it, 'h6&&Text'),
                pic_url: pd(it, 'img&&data-src'),
                desc: pdfh(it, '.absolute-bottom-right&&Text'),
                url: pd(it, 'a&&href'),
                content: pdfh(it, '.video-info-aux&&Text'),
            })
        });
        return setResult(d)
    }
}